include ../../config.make

CFLAGS  = -I$(BOOST_ROOT) \
		  -I../../include \
		  -DLUABIND_DYNAMIC_LINK
LDFLAGS = -L../../lib \
		  -llua

SRC = $(wildcard *.cpp)
OBJ = $(SRC:.cpp=.o)

LIB = ../../lib/libluabindd.so

#################
## MAKE TARGET ##
#################

all: $(LIB)

$(LIB): $(OBJ)
	$(CXX) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^

clean:
	$(RM) *.o

mrproper: clean
	$(RM) $(LIB)

%.o: %.cpp
	$(CXX) $(CFLAGS) -o $@ -c $<

